class Campu < ActiveRecord::Base

  belongs_to :condado, :foreign_key => 'municipio'
  has_many :orgao

  validates_presence_of :id
  validates_presence_of :sigla
  validates_presence_of :nome
  validates_presence_of :municipio
  validates_uniqueness_of :id
  validates_uniqueness_of :sigla
  validates_numericality_of :id

  def to_s
    self.sigla
  end

end
